# image
import numpy as np
import matplotlib.pyplot as plt

# image data
a = np.random.uniform(0, 1, 9).reshape(3, 3)
print(a)

plt.imshow(a, interpolation='nearest', cmap='bone', origin='lower')
plt.colorbar(shrink=0.9) # 压缩为原来的百分之九十
plt.xticks(())
plt.yticks(())
plt.show()